Skip to content

微信支付批次单号查询批次单

普通直连商户可以通过该接口查询品牌红包批次单以及指定状态的品牌红包明细单

请求参数类型描述
batch_nostring微信支付品牌红包批次单号
queryobject声明请求的查询参数
need_query_detailboolean是否需要查询品牌红包明细单
detail_statestring品牌红包明细单状态
DETAIL_VIEW_ALL | DETAIL_VIEW_SUCCESS | DETAIL_VIEW_FAIL 枚举值之一
php
$instance->v3->fundApp->brandRedpacket->brandMerchantBatches->_batch_no_->getAsync([
  'batch_no' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'detail_state'      => 'DETAIL_VIEW_ALL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/fund-app/brand-redpacket/brand-merchant-batches/{batch_no}')->getAsync([
  'batch_no' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'detail_state'      => 'DETAIL_VIEW_ALL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/fund-app/brand-redpacket/brand-merchant-batches/{batch_no}']->getAsync([
  'batch_no' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'detail_state'      => 'DETAIL_VIEW_ALL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->fundApp->brandRedpacket->brandMerchantBatches->_batch_no_->get([
  'batch_no' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'detail_state'      => 'DETAIL_VIEW_ALL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/fund-app/brand-redpacket/brand-merchant-batches/{batch_no}')->get([
  'batch_no' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'detail_state'      => 'DETAIL_VIEW_ALL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/fund-app/brand-redpacket/brand-merchant-batches/{batch_no}']->get([
  'batch_no' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'detail_state'      => 'DETAIL_VIEW_ALL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
brand_mchidstring品牌主商户号
batch_nostring微信支付品牌红包批次单号
out_batch_nostring商家品牌红包批次单号
brand_idnumber品牌ID
template_idstring品牌红包模板ID
brand_appidstring品牌AppID
batch_statestring批次单状态
WAIT_PAY | ACCEPTED | PROCESSING | FINISHED | CLOSED 枚举值之一
batch_namestring品牌红包批次名称
batch_remarkstring品牌红包批次备注
close_reasonstring品牌红包批次单关闭原因
MERCHANT_REVOCATION | SYSTEM_OVERDUE_CLOSE 枚举值之一
total_amountnumber总金额
total_numnumber总笔数
create_timestring品牌红包批次创建时间
update_timestring品牌红包批次更新时间
success_amountnumber发放成功金额
success_numnumber发放成功笔数
fail_amountnumber发放失败金额
fail_numnumber发放失败笔数
detail_listobject[]品牌红包明细列表
transfer_detail_nostring微信支付品牌红包明细单号
out_detail_nostring商家品牌红包明细单号
detail_statestring品牌红包明细单状态
DETAIL_INIT | DETAIL_WAIT_PAY | DETAIL_PROCESSING | DETAIL_SUCCESS | DETAIL_FAIL 枚举值之一

参阅 官方文档

Published on the GitHub by TheNorthMemory